package com.bobo.web.provider.service.impl.order;

import com.bobo.web.api.domain.order.InsuranceDO;
import com.bobo.web.api.domain.order.InsuranceSeckill;
import com.bobo.web.provider.dao.order.InsuranceDAO;
import com.bobo.web.provider.dao.order.InsuranceSeckillDAO;
import com.bobo.web.provider.service.order.InsuranceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class InsuranceServiceImpl implements InsuranceService {
    @Resource
    private InsuranceDAO insuranceDAO;
    @Resource
    private InsuranceSeckillDAO insuranceSeckillDAO;
    @Override
    public InsuranceDO getInsurance(Long id) {
        InsuranceDO insuranceDO1 = insuranceDAO.selectByPrimaryKey(id);
        return insuranceDO1;
    }

    @Override
    public List<InsuranceSeckill> getSeckillInsuranceByID(Long id) {
        List<InsuranceSeckill> insuranceSeckills = insuranceSeckillDAO.selectByInsuranceId(id);
        return insuranceSeckills;
    }
}
